﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace GrayParrot.Core.Data
{
    public interface IRepository<T, TKey> where T : class where TKey : class
    {
        void Add(T item);
        void Remove(T item);
        void Remove(TKey key);
        void Update(T item);
        T Find(TKey key);
        IEnumerable<T> Find(Expression<Func<T, bool>> predicate);
        IEnumerable<T> FindAll();
    }
}
